<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <title>授权</title>
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript">
    $(function() {
    var account=getQueryVariable('account');
    var sid=getQueryVariable('sid');
    var tao_id=getQueryVariable('tao_id');
    var tao_nick=getQueryVariable('tao_nick');
    var auth_time=getQueryVariable('auth_time');
    var expire_time=getQueryVariable('expire_time');
    var date = new Date(expire_time* 1000)
              let y = date.getFullYear();
              let m = date.getMonth() + 1;
              m = m < 10 ? ('0' + m) : m;
              let d = date.getDate();
              d = d < 10 ? ('0' + d) : d;
              let h = date.getHours();
              h = h < 10 ? ('0' + h) : h;
              let minute = date.getMinutes();
              let second = date.getSeconds();
              minute = minute < 10 ? ('0' + minute) : minute;
              second = second < 10 ? ('0' + second) : second;
    var time=y + '-' + m + '-' + d + ' '+ h + ':' + minute + ':' + second
var token=getQueryVariable('token');
    var content =`account:${account}<br/>sid:${sid}<br/>tao_id:${tao_id}<br/>tao_nick:${tao_nick}<br/>auth_time:${auth_time}<br/>expire_time:${expire_time}<br/>token:${token}`;
    $('#content').html(content);
    $('#SID').html(sid);
$('#expire_time').html(time);
})

function getQueryVariable(variable) {
    var query = window.location.search.substring(1);
    var vars = query.split("&");
    for (var i = 0; i < vars.length; i++) {
        var pair = vars[i].split("=");
        if (pair[0] == variable) { return pair[1]; }
    }
    return '';
}
</script>

</head>

<body>
    <div class="dowebok">
        <div class="container">
            <div class="left">
                <div class="login">授权成功</div>
                <div class="eula">喔！亲爱的！授权成功了呢！</div>
            </div>
            <div class="right">
                <svg viewBox="0 0 320 300">
                    <defs>
                        <linearGradient inkscape:collect="always" id="linearGradient" x1="13" y1="193.49992" x2="307"
                            y2="193.49992" gradientUnits="userSpaceOnUse">
                           
                        </linearGradient>
                    </defs>
                    <path d="m 40,120.00016 239.99984,-3.2e-4 c 0,0 24.99263,0.79932 25.00016,35.00016 0.008,34.20084 -25.00016,35 -25.00016,35 h -239.99984 c 0,-0.0205 -25,4.01348 -25,38.5 0,34.48652 25,38.5 25,38.5 h 215 c 0,0 20,-0.99604 20,-25 0,-24.00396 -20,-25 -20,-25 h -190 c 0,0 -20,1.71033 -20,25 0,24.00396 20,25 20,25 h 168.57143" />
                </svg>
                <div class="form">
                    <label for="email">您的SID</label>
                    <p id="SID"></p>
                    <label for="password">您的授权到期时间</label>
                    <p id="expire_time"></p>
                
                </div>
            </div>
        </div>
    </div>
    <script src="js/anime.min.js"></script>
    <script src="js/index.js"></script>
</body>

</html>